import request from '@/util/request'
import type { MvRes, RootMvTag, RootMVRes } from '@/types/video/index'

/**
 * 获取推荐 mv
 * @returns
 */
export const getRecommendVideo = async () => {
  return await request.get<MvRes>('/personalized/mv')
}

/**
 * 获取视频标签
 * @returns
 */
export const getVideoGroupList = async () => {
  return await request.get<RootMvTag>(`/video/group/list`)
}

/**
 * 根据 tag id 获取 video
 * @param id
 * @returns
 */
export const getVideoByTagId = async (id: number) => {
  return await request.get<RootMVRes>(`/video/group?id=${id}`)
}
